package com.itheima;

import java.sql.*;

public class jdbc {
    public static void main(String[] args) throws Exception {
//        1.加载驱动

        sdf
        Class.forName("com.mysql.jdbc.Driver");


        sdfsdfsdfsdf
//        2.建立连接
        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/my_jdbc", "root", "root");
//        3.创建执行者对象
        sdffffffffffff
        Statement statement = connection.createStatement();
//        4.执行sql
        statement.executeUpdate("insert into user values ('1','admin','admin')");
//        5.关闭资源//        1.加载驱动
//        Class.forName("com.mysql.jdbc.Driver");
////        2.建立连接
//        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/my_jdbc", "root", "root");
////        3.创建执行者对象
//        Statement statement = connection.createStatement();
////        4.执行sql




        sdfsdf



        sdfsssss




        sdfsdfsdf
//        statement.executeUpdate("insert into user values ('1','admin','admin')");
////        5.关闭资源
//        statement.close();
//        connection.close();
        statement.close();
        connection.close();
        //        1.加载驱动
        Class.forName("com.mysql.jdbc.Driver");
//        2.建立连接
        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/my_jdbc", "root", "root");
//        3.创建执行者对象
        Statement statement = connection.createStatement();
//        4.执行sql
        statement.executeUpdate("insert into user values ('1','admin','admin')");
//        5.关闭资源
        statement.close();
        connection.close();
        //        1.加载驱动
        Class.forName("com.mysql.jdbc.Driver");
//        2.建立连接
        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/my_jdbc", "root", "root");
//        3.创建执行者对象
        Statement statement = connection.createStatement();
//        4.执行sql
        statement.executeUpdate("insert into user values ('1','admin','admin')");
//        5.关闭资源
        statement.close();
        connection.close();
//        1.加载驱动
        Class.forName("com.mysql.jdbc.Driver");
//        2.建立连接
        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/my_jdbc", "root", "root");
//        3.创建执行者对象
        Statement statement = connection.createStatement();
//        4.执行sql

        sdfsdfsdfsd
        statement.executeUpdate("insert into user values ('1','admin','admin')");
//        5.关闭资源
        statement.close();

        sdfsdfsdf
        connection.close();
    }



    private  String test;
    public void test(){
        System.out.println("123");

        System.out.println("123");

        System.out.println("123");


        System.out.println("123");


        System.out.println("123");


        System.out.println("456");


        System.out.println("123");

        System.out.println("123");
    }
}
